<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/* Start of file cashflows.php */
/* Location: ./cashflow/models/cashlows.php */
class Cashflow extends CI_Model {
    
	function __construct(){
        parent::__construct(); /** Call the Model constructor */
    }
	
	function getBudgetCashflow($year='',$month='',$acc='',$dep='',$per_month=''){
		if($per_month)
            $this->db->select('sum(Credit) as t_Credit');
        else
            $this->db->select('SUM(Credit) as Credit');    
       
        $this->db->where('Tahun',$year);
        $this->db->where('Bulan',$month);
        $this->db->where('MataAnggaran',$acc);
        $this->db->where('DeptID',$dep);
        $Q=$this->db->get('dt_cash_flow');
        return $Q->row_array();
	}
    
    
    
}    